<%@ include file="/includes/includes.jsp" %>
<fieldset class="tablectrl">
    <legend class="padding2p">
        <spring:message code="view.card.user"/>
    </legend>
    <div><spring:message code='login'/>:&nbsp;<c:out value="${userBean.login}"/></div>
    <div><spring:message code='firstName'/>:&nbsp;<c:out value="${userBean.firstName}"/></div>
    <div><spring:message code='lastName'/>:&nbsp;<c:out value="${userBean.lastName}"/></div>
    <div><spring:message code='enabled'/>:&nbsp;<spring:message code='${userBean.enabled}'/></div>
    <div><spring:message code='accountNonExpired'/>:&nbsp;<spring:message code='${userBean.accountNonExpired}'/></div>
    <div><spring:message code='credentialsNonExpired'/>:&nbsp;<spring:message
            code='${userBean.credentialsNonExpired}'/></div>
    <div><spring:message code='accountNonLocked'/>:&nbsp;<spring:message code='${userBean.accountNonLocked}'/></div>
    <div>
        <spring:message code='roles'/>:&nbsp;<c:choose>
        <c:when test="${not empty userBean.roles}">
            <c:forEach var="role" items="${userBean.roles}" varStatus="roleindex">
                <a href="/admin/viewRole.do?roleId=${role.id}"
                   title="<spring:message code='view'/>">
                    <c:out value="${role.name}"/>
                </a>
                <c:if test="${not roleindex.last}"><br></c:if>
            </c:forEach>
        </c:when>
        <c:otherwise><spring:message code="roles.not.defined"/></c:otherwise>
    </c:choose>
    </div>
    <div><spring:message code='regDate'/>:&nbsp;<fmt:formatDate value="${userBean.regDate}" type="date"
                                                                dateStyle="full"/></div>
    <div><spring:message code='lastActivity'/>:&nbsp;<fmt:formatDate value="${userBean.lastActivity}" type="both"
                                                                     dateStyle="full"
                                                                     timeStyle="medium"/></div>
</fieldset>
<form action="/admin/closeUser.do" method="post">
    <input type="submit" name="close" value="<spring:message code='close'/>" class="margin2p"/>
</form>